<script setup>
import {ref} from "vue";
import TableComponent from "@/components/TableComponent.vue";
import CourseFormComponent from "@/components/form/CourseFormComponent.vue";

const title = ref([
  {
    propName: 'id',
    name: '课程号'
  },
  {
    propName: 'name',
    name: '课程名'
  },
  {
    propName: 'credit',
    name: '学分'
  },
  {
    propName: 'count',
    name: '选课人数',
  }
])
const url = ref({
  deleteUrl: '',
  editUrl: '',
  searchUrl: '/course/get-search',
  showUrl: '/course/get-all-course',
  getCountUrl: '/course/get-course-count',
})
const formVisible = ref(false)
const handleDialogCancel = (visible) => {
  formVisible.value = visible
  console.log('cancel', visible)
}
</script>

<template>
  <div class="container">
    <div class="table-container">
      <TableComponent class="table" :title="title" :data="data" :url="url" form-type="Course"/>
    </div>
  </div>
</template>

<style scoped>
</style>
